package com.alibaba.datax.plugin.writer.dmwriter;

import com.alibaba.datax.common.spi.ErrorCode;

public enum DmWriterErrorCode implements ErrorCode {
    REQUIRED_VALUE("DmWriter-00", "缺失必须填写的参数."),
    BAD_SQL_SYNTAX("DmWriter-01", "SQL 语法错误."),
    DATA_ERROR("DmWriter-03", "写入数据错误."),
    BATCH_INSERT_DATA_ERROR("DmWriter-04", "批量写入数据错误."),
    CONNECTION_ERROR("DmWriter-02", "数据库连接失败.");

    private final String code;
    private final String description;

    DmWriterErrorCode(String code, String description) {
        this.code = code;
        this.description = description;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getDescription() {
        return this.description;
    }
}